package com.aplink.generic.pojo.controlspec;

import com.aplink.generic.constant.type.ListViewSelection;
import com.aplink.generic.util.ResourcesHelper;
import com.aplink.generic.util.objectrule.TargetCollection;

public class ListviewSpec extends ControlSpec {
	private static final long serialVersionUID = 8659470932622592134L;
	private boolean isAutoRefresh;
	private boolean isLoadAll;
	private boolean isSwipeToRefresh;
	private boolean isSwipeToRemove;
	private String mContentData;
	private String mDisplayProperty;
	private String mEmptyIcon;
	private String mEmptyMessage;
	private String mFooter;
	private String mHeader;
	private String mLinkingValueProp;
	private ListViewSelection mListViewSelection;
	private String mRowItem;
	private String mRptrdesign;
	private String mSwipeToRefreshTitle;
	private TargetCollection mTargetCollection;
	private String mValueProp;

	public ListviewSpec() {
		this.mListViewSelection = ListViewSelection.NONE;
	}

	public ListviewSpec(final String mRowItem, final String mRptrdesign,
	        final String mContentData, final TargetCollection targetCollection,
	        final String mHeader, final String mFooter,
	        final ListViewSelection listViewSelection) {
		this.mRowItem = mRowItem;
		this.mRptrdesign = mRptrdesign;
		this.mContentData = mContentData;
		mTargetCollection = targetCollection;
		this.mHeader = mHeader;
		this.mFooter = mFooter;
		if (listViewSelection == null) {
			this.mListViewSelection = ListViewSelection.NONE;
		} else {
			this.mListViewSelection = listViewSelection;
		}
	}

	public int getContentDataID() {
		return ResourcesHelper.getRawIdByName(this.mContentData);
	}

	public String getDisplayProperty() {
		return this.mDisplayProperty;
	}

	public int getEmptyIconID() {
		return ResourcesHelper.getDrawableIdByName(mEmptyIcon);
	}

	public String getEmptyMessage() {
		return mEmptyMessage;
	}

	public String getFooter() {
		return this.mFooter;
	}

	public String getHeader() {
		return this.mHeader;
	}

	public String getLinkingValueProp() {
		return this.mLinkingValueProp;
	}

	public ListViewSelection getListViewSelection() {
		return this.mListViewSelection;
	}

	public String getRowItem() {
		return this.mRowItem;
	}

	public String getRptrdesign() {
		return this.mRptrdesign;
	}

	public int getRptrdesignID() {
		return ResourcesHelper.getRawIdByName(this.mRptrdesign);
	}

	public String getSwipeToRefreshTitle() {
		return mSwipeToRefreshTitle;
	}

	public TargetCollection getTargetCollection() {
		return this.mTargetCollection;
	}

	public String getValueProp() {
		return mValueProp;
	}

	public String initContentData() {
		return this.mContentData;
	}

	public boolean isAutoRefresh() {
		return isAutoRefresh;
	}

	public boolean isLoadAll() {
		return this.isLoadAll;
	}

	public boolean isSwipeToRefresh() {
		return isSwipeToRefresh;
	}

	public boolean isSwipeToRemove() {
		return isSwipeToRemove;
	}

	public void setAutoRefresh(boolean isAutoRefresh) {
		this.isAutoRefresh = isAutoRefresh;
	}

	public void setContentDatal(final String contentData) {
		this.mContentData = contentData;
	}

	public void setDisplayProperty(final String displayProperty) {
		this.mDisplayProperty = displayProperty;
	}

	public void setEmptyIcon(String emptyIcon) {
		this.mEmptyIcon = emptyIcon;
	}

	public void setEmptyMessage(final String emptyMessage) {
		mEmptyMessage = emptyMessage;
	}

	public void setFooter(final String footer) {
		this.mFooter = footer;
	}

	public void setHeader(final String header) {
		this.mHeader = header;
	}

	public void setLinkingValueProp(final String linkingValueProp) {
		this.mLinkingValueProp = linkingValueProp;
	}

	public void setListViewSelection(final ListViewSelection listViewSelection) {
		this.mListViewSelection = listViewSelection;
	}

	public void setLoadAll(final boolean isLoadAll) {
		this.isLoadAll = isLoadAll;
	}

	public void setRowItem(final String rowItem) {
		this.mRowItem = rowItem;
	}

	public void setRptrdesign(final String rptrdesign) {
		this.mRptrdesign = rptrdesign;
	}

	public void setSwipeToRefresh(final boolean isSwipeToRefresh) {
		this.isSwipeToRefresh = isSwipeToRefresh;
	}

	public void setSwipeToRefreshTitle(final String swipeToRefreshTitle) {
		mSwipeToRefreshTitle = swipeToRefreshTitle;
	}

	public void setSwipeToRemove(boolean isSwipeToRemove) {
		this.isSwipeToRemove = isSwipeToRemove;
	}

	public void setTargetCollection(final TargetCollection targetCollection) {
		this.mTargetCollection = targetCollection;
	}

	public void setValueProp(String valueProp) {
		mValueProp = valueProp;
	}
}
